import React, { Component } from "react";
import Home from "./common/home";
import About from "./common/about";
import { BrowserRouter, NavLink, Route } from "react-router-dom";
export default class Index extends Component {
  render() {
    return (
      <BrowserRouter>
        <NavLink to="/home">首页</NavLink>&nbsp;&nbsp;
        <NavLink to="/about">关于</NavLink>
        <Route path="/home" component={Home} />
        <Route path="/about" component={About} />
      </BrowserRouter>
    );
  }
}
